﻿﻿@using System.Web.Mvc;

    @if (WorkContext.CurrentUser != null) {
       <li class="has-dropdown">
            <a href="#">&nbsp;@Html.ItemDisplayText(WorkContext.CurrentUser)</a>
            <ul class="dropdown">
                <li>@Html.ActionLink(T("Change Password").ToString(), "ChangePassword", new { Controller = "Account", Area = "Orchard.Users" })</li>
                <li>@Html.ActionLink(T("Sign Out").ToString(), "LogOff", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = Context.Request.RawUrl }, new { rel = "nofollow" })</li>
                @if (AuthorizedFor(Orchard.Security.StandardPermissions.AccessAdminPanel)) {
                    <li>@Html.ActionLink(T("Dashboard").ToString(), "Index", new { Area = "Dashboard", Controller = "Admin" })</li>
                }
            </ul>
        </li>
    }
    else {
        <li>@Html.ActionLink(T("Sign In").ToString(), "LogOn", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = (Request.QueryString["ReturnUrl"] ?? Request.RawUrl) }, new { rel = "nofollow" })</li>
    }

